package com.sharekitchen.entity;

import com.sharekitchen.common.MyConst;

public class User {
    // 用户ID：user_id，int，主键自增
    private int userId;
    // 用户名称：username，varchar（255），非空，唯一
    private String username;
    // 用户密码：password，varchar（255），非空
    private String password;
    // 用户头像：user_url，varchar（255），默认="默认图片"
    private String userUrl;
    // 用户余额：user_money，double，默认0.00
    private double userMoney;
    // 用户创建时间: create_time ，varchar（255），非空
    private String createTime;
    // 逻辑删除：is_delete，int，默认0，1=>已删除，0=>未删除
    private int isDelete = MyConst.DELETE_NO;

    public User(int userId, String username, String password, String userUrl, double userMoney, String createTime, int isDelete) {
        this.userId = userId;
        this.username = username;
        this.password = password;
        this.userUrl = userUrl;
        this.userMoney = userMoney;
        this.createTime = createTime;
        this.isDelete = isDelete;
    }

    public User() {
    }

    @Override
    public String toString() {
        return "User{" +
                "userId=" + userId +
                ", username='" + username + '\'' +
                ", password='" + password + '\'' +
                ", userUrl='" + userUrl + '\'' +
                ", userMoney=" + userMoney +
                ", createTime='" + createTime + '\'' +
                ", isDelete=" + isDelete +
                '}';
    }

    public int getUserId() {
        return userId;
    }

    public void setUserId(int userId) {
        this.userId = userId;
    }

    public String getUsername() {
        return username;
    }

    public void setUsername(String username) {
        this.username = username;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public String getUserUrl() {
        return userUrl;
    }

    public void setUserUrl(String userUrl) {
        this.userUrl = userUrl;
    }

    public double getUserMoney() {
        return userMoney;
    }

    public void setUserMoney(double userMoney) {
        this.userMoney = userMoney;
    }

    public String getCreateTime() {
        return createTime;
    }

    public void setCreateTime(String createTime) {
        this.createTime = createTime;
    }

    public int getIsDelete() {
        return isDelete;
    }

    public void setIsDelete(int isDelete) {
        this.isDelete = isDelete;
    }
}
